import pytest
import os
if __name__ == '__main__':
    pytest.main(['-vs','test_calc.py'])
    # pytest.main(['-vs', '--html=./report.html', 'test_calc.py']) # pytest-html 生成html测试报告
    # pytest.main(['-vs', 'test_calc.py', '--alluredir=./json_report']) # allure-pytest 生成json格式的测试报告
    # os.system('allure generate ./json_report -o ./html_report --clean') # 生成html格式的测试报告

# 运行 allure 要有 Java 环境 https://blog.csdn.net/weixin_45710060/article/details/123315280

    # pytest.main(["-v", "--alluredir=./allure-results", "test_calc.py"])
    # 终端窗口运行：allure serve allure-results